#include <iostream>
using namespace std;

class N {
public:
	void display() { cout << "N:" << a << endl; }
	N(int i) { a = i; }
	int a;
};

class A :virtual public N {
public:
	void display() { cout << "A" << endl; }
	A(int i) :N(i) {}
	int a1;
};

class B :virtual public N {
public:
	void display() { cout << "B" << endl; }
	B(int i) :N(i) {}
	int a2;
};

class C :public A, public B {
public:
	void display() { cout << "C" << endl; }
	C(int i) :N(i), A(i), B(i) {}
	int a3;
};

//int main() {
//	C c1(10);
//	c1.a = 3;
//	c1.display();
//	return 0;
//}